# -*- coding:utf-8 -*-
import requests
import json


def lsj(num=1):
    return lsjrall(1,0)

def lsjr18(num=1):
    return lsjrall(1,1)

def lsjrall(num=1,r18=0):
    html = requests.get(url='https://api.lolicon.app/setu/v2?size=regular&r18='+str(r18)+'&num='+str(num), timeout=10)
    jso = json.loads(html.content.decode('utf-8'))
    print(jso)
    resultList = []
    for bean in jso.get('data'):
        resultList.append(bean.get('urls').get('regular'))
    return resultList

if __name__ == '__main__':
    print('执行')
    print(lsjrall(1,0))